CvsClient Methods

The CvsClient object contains the following methods:

Methods ending in Ex represent extended messaging functionality, for example, getting and storing the Long Point Id in the entry record, and getting and storing extended value fields, e.g., TimeStampType, UserStatus, and ValueType fields.

A description for each variant object can be found in CxCvsLib Helper Objects.

AlphaGet

Syntax

AlphaGet(Request As AlphaGetReq, Response As AlphaGetResp) As Integer

Parameters

Parameter Required Description Variant

Request

Yes

The request object that contains the parameters for this method.

AlphaGetReq

Response

Yes

The response object that contains the output of this method.

AlphaGetResp

Back to top

AlphaGetRtREx

Syntax

AlphaGetRtREx (Request As AlphaGetRtRExReq, Response As AlphaGetRtRExResp) As Integer

Parameters

Parameter Required Description Variant

Request

Yes

The request object that contains the parameters for this method.

AlphaGetRtRExReq

Response

Yes

The response object that contains the output of this method.

AlphaGetRtRExResp

Back to top

Connect

The Connect method connects the object to a service.

Syntax

Connect(DomainSiteService As String)

Parameters

Parameter Required Description

DomainSiteService

Yes

The [Domain]Site.Service to which to connect. The domain is optional. The service must be a valid one.

Remarks

Returns 0 if successful and a non-zero value if the connection failed.

Example

The following example connects the Client object to the CYGDEMO.<SVC> on domain 5410:

Copy
Connect
Sub TheView_EventInitialize()
    'Connect to a UIS
    Dim This : Set This = TheView
    CvsClient.Connect("[5410]CYGDEMO.UIS")
End Sub

Back to top

Disconnect

The Disconnect method disconnects from the connected service.

Syntax

Disconnect() As Integer

Remarks

The Disconnect method returns 0 if successful and a non-zero value if the disconnect failed.

Example

The following example disconnects the Client object from the connected service, and pops a message box if it is unsuccessful:

Copy
Disconnect
Sub Svc.Disconnect()
 
    <SvcClient>.Disconnect()
    MsgBox "Service has disconnected."
    
    If <SvcClient>.Disconnect <> 0 
    Then
        MsgBox "Failed to disconnect."
    End If

End Sub

The following example disconnects from the CVS when the button is clicked.

Copy
Disconnect
Sub btnButton_EventClick()

Dim This : Set This = btnButton
    Dim iTest
    iTest = CvsClient.Disconnect()
    If iTest <> 0 Then
        MsgBox "Error in disconnecting"
    End If

End Sub

Back to top

GetConsoleData

The GetConsoleData method returns the console text and display attributes as two 25x80 arrays of unsigned characters.

Syntax

GetConsoleData(ByRef pText, ByRef pAttr) As Integer

Parameters

Parameter Required Description

pText

Yes

A two-dimensional 25x80 array of console text attributes returned by this method.

pAttr

Yes

A two-dimensional 25x80 array of console display attributes returned by this method.

Remarks

This method returns 0 if successful.

Example

The following example writes the console text and display attributes to a CSV file.

Copy
GetConsoleData
Sub
    Dim aryText, aryAttr, nRet
    nRet = <NameofServiceClientObject>.GetConsoleData(aryText, aryAttr)
 
    ' Write text attributes to CSV file
    Dim i, j, strMsg
        For i = 0 To UBound(aryText, 1)
        For j = 0 To UBound(aryText, 2)
            strMsg = strMsg + CStr(aryText(i, j)) + ","
        Next
            strMsg = strMsg + vbCr
    Next
 
    dim fso, file
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set file = fso.OpenTextFile("c:\console_text_attrs.csv", 2, True)
    file.WriteLine(strMsg)
    file.Close 
 
    strMsg = ""
 
    ' Write display attributes to CSV file
        For i = 0 To UBound(aryAttr, 1)
        For j = 0 To UBound(aryAttr, 2)
            strMsg = strMsg + CStr(aryAttr(i, j)) + ","
        Next
            strMsg = strMsg + vbCr
    Next
 
    Set file = fso.OpenTextFile("c:\console_disp_attrs.csv", 2, True)
    file.WriteLine(strMsg)
    file.Close 
 
    MsgBox nRet
End Sub

Back to top

GetFacilityList

The GetFacilityList method returns a list of facility IDs in a CVS.

Syntax

GetFacilityList(ByRef FacilityList) As Integer

Parameters

Parameter Required Description

FacilityList

Yes

Output. The array of facilities received.

Back to top

GetNamedRec

Syntax

GetNamedRec(Request As GetNamedRecReq, Response As GetNamedRecResp) As Integer

Parameters

Parameter Required Description Variant

Request

Yes

The request object that contains the parameters for this method.

GetNamedRecReq

Response

Yes

The response object that contains the output of this method.

GetNamedRecResp

Back to top

GetNamedRtREx

Syntax

GetNamedRtREx(Request As GetNamedRtRExReq, Response As GetNamedRtRExResp) As Integer

Parameters

Parameter Required Description Variant

Request

Yes

The request object that contains the parameters for this method.

GetNamedRtRExReq

Response

Yes

The response object that contains the output of this method.

GetNamedRtRExResp

Back to top

GetNamedSRtREx

Syntax

GetNamedSRtREx(Request As GetNamedSRtRExReq, Response As GetNamedSRtRExResp) As Integer

Parameters

Parameter Required Description Variant

Request

Yes

The request object that contains the parameters for this method.

GetNamedSRtRExReq

Response

Yes

The response object that contains the output of this method.

GetNamedSRtRExResp

Back to top

GetPointList

The GetPointList method returns a list of Short Point IDs.

Syntax

GetPointList(Descriptor As String, ByRef PointList) As Integer

Parameters

Parameter Required Description

Descriptor

Yes

Indicates the descriptor(s) to retrieve for the point.

PointList

Yes

Output. The array of Short Point IDs returned.

Back to top

GetRec

Syntax

GetRec(Request As GetRecReq, Response As GetRecResp) As Integer

Parameters

Parameter Required Description Variant

Request

Yes

The request object that contains the parameters for this method.

GetRecReq

Response

Yes

The response object that contains the output of this method.

GetRecResp

Back to top

GetReferences

The GetReferences method refreshes the list of services referenced by the connected service.

Syntax

GetReferences() As Integer

Return Values

This method returns all references for the connected service.

Example

The following example refreshes the connected services:

Copy
GetReferences
Sub GetReferences()
 
    <NameofServiceClientObject>.GetReferences
    MsgBox "Services references retrieved"

End Sub

The following example refreshes the referenced services.

Copy
GetReferences
Sub GetReferences()
    'Create and initialize the CVS Client
    Dim CvsClient
    Set CvsClient = CreateObject("CxCvs.CvsClient")
    CvsClient.Connect("CYGDEMO.UIS")
     
    uisClient.GetReferences()
End Sub

Back to top

GetRefs

Syntax

GetRefs(Request As GetRefsReq, Response As GetRefsResp) As Integer

Parameters

Parameter Required Description Variant

Request

Yes

The request object that contains the parameters for this method.

GetRefsReq

Response

Yes

The response object that contains the output of this method.

GetRefsResp

Back to top

GetRtREx

Syntax

GetRtREx(Request As GetRtRExReq, Response As GetRtRExResp) As Integer

Parameters

Parameter Required Description Variant

Request

Yes

The request object that contains the parameters for this method.

GetRtRExReq

Response

Yes

The response object that contains the output of this method.

GetRtRExResp

Back to top

GetShortNamedRec

Syntax

GetShortNamedRec(Request As GetShortNamedRecReq, Response As GetShortNamedRecResp) As Integer

Parameters

Parameter Required Description Variant

Request

Yes

The request object that contains the parameters for this method.

GetShortNamedRecReq

Response

Yes

The response object that contains the output of this method.

GetShortNamedRecResp

Back to top

GetShortRec

Syntax

GetShortRec(Request As GetShortRecReq, Response As GetShortRecResp) As Integer

Parameters

Parameter Required Description Variant

Request

Yes

The request object that contains the parameters for this method.

GetShortRecReq

Response

Yes

The response object that contains the output of this method.

GetShortRecResp

Back to top

GetSNamedRtREx

Syntax

GetSNamedRtREx(Request As GetSNamedRtRExReq, Response As GetSNamedRtRExResp) As Integer

Parameters

Parameter Required Description Variant

Request

Yes

The request object that contains the parameters for this method.

GetSNamedRtRExReq

Response

Yes

The response object that contains the output of this method.

GetSNamedRtRExResp

Back to top

GetSRtREx

Syntax

GetSRtREx(Request As GetSRtRExReq, Response As GetSRtRExResp) As Integer

Parameters

Parameter Required Description Variant

Request

Yes

The request object that contains the parameters for this method.

GetSRtRExReq

Response

Yes

The response object that contains the output of this method.

GetSRtRExResp

Back to top

MatchName

Syntax

MatchName(Request As MatchNameReq, Response As MatchNameResp) As Integer

Parameters

Parameter Required Description Variant

Request

Yes

The request object that contains the parameters for this method.

MatchNameReq

Response

Yes

The response object that contains the output of this method.

MatchNameResp

Back to top

MatchNamedRtREx

Syntax

MatchNamedRtREx(Request As MatchNamedRtRExReq, Response As MatchNamedRtRExResp) As Integer

Parameters

Parameter Required Description Variant

Request

Yes

The request object that contains the parameters for this method.

MatchNamedRtRExReq

Response

Yes

The response object that contains the output of this method.

MatchNamedRtRExResp

Back to top

ResolvePoints

The ResolvePoints method resolves a list of facility UDCs or Long Point IDs.

Syntax

ResolvePoints(TagList, ByRef PointList) As Integer

Parameters

Parameter Required Description

TagList

Yes

An array of Long Point IDs or facility UDCs (in "FACILITY.UDC" format) to convert to Short Point IDs.

PointList

Yes

Output. The array of Short Point IDs returned.

Back to top

SetRecord

Syntax

SetRecord(Request As SetRecordReq, Response As SetRecordResp) As Integer

Parameters

Parameter Required Description Variant

Request

Yes

The request object that contains the parameters for this method.

SetRecordReq

Response

Yes

The response object that contains the output of this method.

SetRecordResp

Back to top

SetRtREx

Syntax

SetRtREx(Request As SetRtRExReq, Response As SetRtRExResp) As Integer

Parameters

Parameter Required Description Variant

Request

Yes

The request object that contains the parameters for this method.

SetRtRExReq

Response

Yes

The response object that contains the output of this method.

SetRtRExResp

Back to top